//
//  ViewController.m
//  Example
//
//  Created by gupengling on 2021/6/4.
//

#import "ViewController.h"
#import <UIKitExtentions/UIKitExtentions-Swift.h>
#import <UIKitExtentions/UIKitExtentions.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [UELogCrash setDefaultUncaughtExceptionHandler];
    
    UIKitButton *btn = [[UIKitButton alloc] initWithAction:^(UIKitButton * _Nonnull button) {
        UELogDebug([UELogAutoFile default], @"%@", button);
        UELogInfo([[UELogAutoFileConfig sharedInstance] socket], @"%@", button);
    }];
    btn.frame = CGRectMake(100, 100, 50, 50);
    btn.backgroundColor = [UIColor redColor];
    [self.view addSubview:btn];

    NSLog(@"sadasdsa %d %@",12,@"hahahhaha");
    UELogMessage(nil, info, @"xxxx = %@",@"hi man");

    UELogVerbose(nil, @"verbose");
    UELogDebug(nil, @"debug");
    UELogInfo(nil, @"info");
    UELogWarning(nil, @"warning");
    UELogError(nil, @"error");

    UELogVerbose([UELogAutoFile default], @"verbose");
    UELogDebug([UELogAutoFile default], @"debug");
    UELogInfo([[UELogAutoFileConfig sharedInstance] socket], @"info");
    UELogWarning([[UELogAutoFileConfig sharedInstance] socket], @"warning");
    UELogError([[UELogAutoFileConfig sharedInstance] socket], @"error");

}

@end
